﻿package org.cubeland.game.core.drawing.yuki 
{
	import flash.display.Bitmap;
	import org.papervision3d.materials.BitmapMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.primitives.Cube;
	/**
	 * CubeLand.org Game
	 * @author Duarte Peixinho
	 */
	public class DrawYukiHead extends Cube
	{
		
		[Embed(source = '../../../assets/yuki/headTexture.jpg')]
		private var YukiHead:Class;
		[Embed(source = '../../../assets/yuki/headTextureSmile.jpg')]
		private var YukiHeadSmile:Class;		
		[Embed(source = '../../../assets/yuki/headTextureBack.jpg')]
		private var YukiHeadBack:Class;
		[Embed(source = '../../../assets/yuki/headTextureRight.jpg')]
		private var YukiHeadRight:Class;
		[Embed(source = '../../../assets/yuki/headTextureLeft.jpg')]
		private var YukiHeadLeft:Class;
		[Embed(source = '../../../assets/yuki/headTextureTop.jpg')]
		private var YukiHeadTop:Class;		
		
		public function DrawYukiHead() 
		{
			super(drawMaterials(), 100, 100, 100, 10, 10, 5);			
		}
		
		private function drawMaterials():MaterialsList {			
			var BBottom:Bitmap = new YukiHead();
			var BFront:Bitmap = new YukiHeadSmile();
			var BBack:Bitmap = new YukiHeadBack();
			var BLeft:Bitmap = new YukiHeadLeft();
			var BRight:Bitmap = new YukiHeadRight();
			var BTop:Bitmap = new YukiHeadTop();
			
			var BBottomD:BitmapMaterial = new BitmapMaterial(BBottom.bitmapData);	
			var BFrontD:BitmapMaterial = new BitmapMaterial(BFront.bitmapData);
			var BBackD:BitmapMaterial = new BitmapMaterial(BBack.bitmapData);
			var BLeftD:BitmapMaterial = new BitmapMaterial(BLeft.bitmapData);
			var BTopD:BitmapMaterial = new BitmapMaterial(BTop.bitmapData);
			var BRightD:BitmapMaterial = new BitmapMaterial(BRight.bitmapData);				

			BBottomD.smooth = true;			
			BFrontD.smooth = true;
			BBackD.smooth = true;
			BLeftD.smooth = true;
			BTopD.smooth = true;
			BRightD.smooth = true;
			
			var m:MaterialsList = new MaterialsList( {left: BLeftD,right: BRightD,top: BTopD,bottom: BBottomD,back: BFrontD,front:BBackD} );			
			return m;
		}
		
		public function happy():void {
			
		}
		
		public function sad():void {
			
		}
		
		public function surprised():void {
			
		}
		
		public function normal():void {
			
		}		
		
	}

}